import request from '@/config/axios'

export interface ReqElecChargeRefundVO {
  id: number
  memberUserId: number
  houseId: number
  roomId: number
  meterId: number
  chkStatus: Boolean
  expireTime: Date
  successTime: Date
  reqReadoutBalance: number
  refundReadoutBalance: number
  refundPlatformFeeAmount: number
  refundChannelFeeAmount: number
  refundAmount: number
  refundBalance: number
  refundStatus: Boolean
}

// 查询退款申请列表
export const getReqElecChargeRefundPage = async (params) => {
  return await request.get({ url: `/zwsj/req-elec-charge-refund/page`, params })
}

// 查询退款申请详情
export const getReqElecChargeRefund = async (id: number) => {
  return await request.get({ url: `/zwsj/req-elec-charge-refund/get?id=` + id })
}

// 新增退款申请
export const createReqElecChargeRefund = async (data: ReqElecChargeRefundVO) => {
  return await request.post({ url: `/zwsj/req-elec-charge-refund/create`, data })
}

// 修改退款申请
export const updateReqElecChargeRefund = async (data: ReqElecChargeRefundVO) => {
  return await request.put({ url: `/zwsj/req-elec-charge-refund/update`, data })
}

// 删除退款申请
export const deleteReqElecChargeRefund = async (id: number) => {
  return await request.delete({ url: `/zwsj/req-elec-charge-refund/delete?id=` + id })
}

// 导出退款申请 Excel
export const exportReqElecChargeRefund = async (params) => {
  return await request.download({ url: `/zwsj/req-elec-charge-refund/export-excel`, params })
}
